package com.ymatou.query.seller.trading.api.parameter.info;

import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.List;

import net.sf.json.JSONObject;

import com.ymatou.iapi.trading.sellerquery2.parameter.vo.SubProductInfo;

public class OrderProductInfo extends SimpleProductInfo {

	// 保税区
	private int BondedArea;
	// 品牌ID
	private int BrandId;
	// 商品分类[0]:一级,[1]:二级,[2]:三级. Categories.Length>=3.
	private List<Integer> Categories;
	// 数量
	private int Count;
	// 配送方式
	private int Logistics;
	// 商品名称
	private String Name;
	// 原价
	private BigDecimal OriginalPrice = new BigDecimal(0);
	// 商品分摊运费
	private BigDecimal PartialFreight = new BigDecimal(0);
	// 商品分摊的平台优惠金额
	private BigDecimal PartialYmtCoupon = new BigDecimal(0);
	// 单价(成交价)
	private BigDecimal Price = new BigDecimal(0);
	// 商品规格
	private String PropertyInfo;
	// 退货退款信息
	private OrderProductRefundInfo RefundInfo;
	// SKU
	private String SKU;
	// 总价=单价*数量
	private BigDecimal TotalPrice = new BigDecimal(0);
	// 商品分摊的折扣调整金额
	private BigDecimal PartialDiscount = new BigDecimal(0);
	// 商品分摊的商家优惠金额
	private BigDecimal PartialSellerCoupon = new BigDecimal(0);
	// 商品分摊的商家满减优惠金额
	private BigDecimal PartialSellerPromotion = new BigDecimal(0);

	/**
	 * 组合商品
	 */
	private List<SubProductInfo> SubProductInfos;

	public BigDecimal getPartialDiscount() {
		return PartialDiscount;
	}

	public void setPartialDiscount(BigDecimal partialDiscount) {
		PartialDiscount = partialDiscount;
	}

	public BigDecimal getPartialSellerCoupon() {
		return PartialSellerCoupon;
	}

	public void setPartialSellerCoupon(BigDecimal partialSellerCoupon) {
		PartialSellerCoupon = partialSellerCoupon;
	}

	public BigDecimal getPartialSellerPromotion() {
		return PartialSellerPromotion;
	}

	public void setPartialSellerPromotion(BigDecimal partialSellerPromotion) {
		PartialSellerPromotion = partialSellerPromotion;
	}

	public int getBondedArea() {
		return BondedArea;
	}

	public void setBondedArea(int bondedArea) {
		BondedArea = bondedArea;
	}

	public int getBrandId() {
		return BrandId;
	}

	public void setBrandId(int brandId) {
		BrandId = brandId;
	}

	public List<Integer> getCategories() {
		return Categories;
	}

	public void setCategories(List<Integer> categories) {
		Categories = categories;
	}

	public int getCount() {
		return Count;
	}

	public void setCount(int count) {
		Count = count;
	}

	public int getLogistics() {
		return Logistics;
	}

	public void setLogistics(int logistics) {
		Logistics = logistics;
	}

	public String getName() {
		return Name;
	}

	public void setName(String name) {
		Name = name;
	}

	public BigDecimal getOriginalPrice() {
		return OriginalPrice;
	}

	public void setOriginalPrice(BigDecimal originalPrice) {
		OriginalPrice = originalPrice;
	}

	public BigDecimal getPartialFreight() {
		return PartialFreight;
	}

	public void setPartialFreight(BigDecimal partialFreight) {
		PartialFreight = partialFreight;
	}

	public BigDecimal getPartialYmtCoupon() {
		return PartialYmtCoupon;
	}

	public void setPartialYmtCoupon(BigDecimal partialYmtCoupon) {
		PartialYmtCoupon = partialYmtCoupon;
	}

	public BigDecimal getPrice() {
		return Price;
	}

	public void setPrice(BigDecimal price) {
		Price = price;
	}

	public String getPropertyInfo() {
		return PropertyInfo;
	}

	public void setPropertyInfo(String propertyInfo) {
		PropertyInfo = propertyInfo;
	}

	public OrderProductRefundInfo getRefundInfo() {
		return RefundInfo;
	}

	public void setRefundInfo(OrderProductRefundInfo refundInfo) {
		RefundInfo = refundInfo;
	}

	public String getSKU() {
		return SKU;
	}

	public void setSKU(String sKU) {
		SKU = sKU;
	}

	public BigDecimal getTotalPrice() {
		return TotalPrice;
	}

	public void setTotalPrice(BigDecimal totalPrice) {
		TotalPrice = totalPrice;
	}

	public boolean equals(OrderProductInfo o1) {
		return o1.toString().equals(this.toString());
	}

	public String toString() {
		return JSONObject.fromObject(this).toString();
	}

	public List<SubProductInfo> getSubProductInfos() {
		return SubProductInfos;
	}

	public void setSubProductInfos(List<SubProductInfo> subProductInfos) {
		SubProductInfos = subProductInfos;
	}

	public static void main(String[] args) {
		Class c = OrderProductInfo.class;
		for (Field f : c.getDeclaredFields()) {
			String s = f.getName();
			System.out
					.println("DataUtil.verifyEquals(expect.get"
							+ s
							+ "(), actual.get"
							+ s
							+ "(), \"验证id=[\" + expectId+ \"]的ProductId=[\"+pid+\"]的Product."
							+ s + "\");");
		}
		OrderProductInfo o1 = new OrderProductInfo();
		OrderProductInfo o2 = new OrderProductInfo();
		System.out.println(o1.equals(o2));
	}

}
